extends ColorRect

onready var label = $label
onready var tween:Tween = $Tween
var text = ""

signal finish

func showTurn(curTurn):
	if curTurn:
		text = "我方回合"
	else:
		text = "敌方回合"
	yield(get_tree().create_timer(1.0), "timeout")
	label.text = text
	tween.interpolate_property(label, "percent_visible", 0, 1, 1, true)
	tween.start()
	yield(tween, "tween_all_completed")
	yield(get_tree().create_timer(1,0), "timeout")
	emit_signal("finish")
